Add SetReferenceType method to SignedXml and SignedXmlImpl (#10139) - #10212
Add SetReferenceType method to SignedXml and SignedXmlImpl (#10139)#10212Marco Antonio Mauro (marcus905) wants to merge 1 commit into
Conversation
|
@microsoft-github-policy-service agree |
Agentic PR Review - Round 1Recommendation: AcceptWhat this PR doesThis PR exposes SuggestionsNo blocking issues or required follow-ups found. Risk assessment and necessityRisk: Low. The new method is additive and leaves existing signing behavior unchanged unless callers explicitly set the reference type. Necessity: The API fills a gap for XML signature profiles that require a typed reference, such as XAdES SignedProperties references.
|
What & why
Adds support for setting the
Typeproperty on an XMLDSIGReferencethrough the publicSignedXmlcodeunit.SignedXmlalready exposes the reference URI, digest method, and transforms, but not the underlyingReference.Typeproperty. This prevents callers from creating XML signatures that require a typed reference, such as a reference to XAdESSignedProperties.The change adds
SetReferenceType(Type: Text)toSignedXmland its implementation, together with a unit test verifying that the configured value is emitted as theTypeattribute of the generated<Reference>element.Linked work
Fixes #10139
How I validated this
What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)
SignedXmlModuleTest.Codeunit.althat initializes an XMLDSIG reference, sets itsType, computes the signature, and verifies that the generated<Reference>element contains the expectedTypeattribute.Risk & compatibility
Low risk. The change only adds a new public procedure and delegates it to the existing underlying .NET
Reference.Typeproperty.There are no breaking changes, data or upgrade impacts, permission changes, telemetry changes, or feature flags.